<?php
class Registration extends GetData{

	private $daten;
	public $System;

	public function __construct($match){
		$this->daten = $match;
	}

	public function getWort(RainTPL $design){
	    
	    if($design->post->email){
	        $user = new Db_User();
	        $status = $user->CreateUser($design->post->data);
	        
	        if(is_numeric($status)){
	           $design->assign('error',$status); 
	        }else{	            
			    HTTP::redirect(ConfigFile::Get('BASE_DIR'));	
	        }
	    }
				
		$design->assign ('css',"registration");
		$design->assign ('js',"jsHome");		
		

		if( $cache = $design->cache( $design->ln.'/registration', $expire_time = 0 ) )
	    {
	 	    echo $cache;
	    }
	    else
	    {
	 	    $design->draw( $design->ln.'/registration' );
	    }
	}

}
?>